//
//  MapViewController.m
//  HZHome
//
//  Created by SunShine on 13-10-12.
//  Copyright (c) 2013年 xzysun. All rights reserved.
//

#import "MapViewController.h"

@interface MapViewController ()

@end

@implementation MapViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"地图";
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)showMaskWithLatitude:(double)latitude Longitude:(double)longitude
{
    CLLocationCoordinate2D centerCoord = CLLocationCoordinate2DMake(latitude, longitude);
    [self.mapView setCenterCoordinate:centerCoord animated:YES];
    MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(centerCoord, 1000, 1000 );
    [self.mapView setRegion:region animated:YES];
    MapAnnotation *annotation = [[MapAnnotation alloc]initWithCoordinate:centerCoord];
    [self.mapView addAnnotation:annotation];
}
@end

@implementation MapAnnotation

- (id) initWithCoordinate:(CLLocationCoordinate2D) temp_coordinate
{
    if ([super init])
    {
        _coordinate = temp_coordinate;
    }
    return  self;
}
@end
